import httpRequest from '@/utils/request'

// 获取员工数据
export const getEmployeeListAPI = (params) => httpRequest({ url: `/sys/user`, params })

// 导出员工信息
export const exportEmployeeAPI = () => httpRequest({ url: `/sys/user/export`, responseType: 'blob' })

// 下载员工信息模板
export const templateEmployeeAPI = () => httpRequest({ url: `/sys/user/import/template`, responseType: 'blob' })

// 导入员工信息
export const inportEmployeeAPI = (data) => httpRequest({ url: `/sys/user/import`, method: 'POST', data })

// 删除员工数据
export const delEmployeeAPI = (id) => httpRequest({ url: `/sys/user/${id}`, method: 'DELETE' })

// 添加员工信息
export const addEmployeeAPI = (data) => httpRequest({ url: `/sys/user`, method: 'POST', data })

// 添个根据id查询详细员工信息
export const getEmployeeDetailsAPI = (id) => httpRequest({ url: `/sys/user/${id}` })

// 修改详细员工信息
export const putEmployeeDetailsAPI = (data) => httpRequest({ url: `/sys/user/${data.id}`, method: 'PUT', data })

// 选择的角色列表
export const getAllRoleListAPI = () => httpRequest({ url: `/sys/role/list/enabled` })

// 确认分配角色
export const putRoleListAPI = (data) => httpRequest({ url: `/sys/user/assignRoles`, method: 'PUT', data })

